export default {
    getToken (state) {
        return state.loginUser.token;
    },
    getUser (state) {
        return state.loginUser;
    },
    getUserType (state) {
        return state.loginUser.userType;
    },
    getUserHomePath (state) {
        return state.loginUser.menus[ 0 ].path;
    },
    getUserFormList (state) {
        return state.formList;
    },
    getUserMenus (state) {
        return state.loginUser.menus;
    },
    getHasEventForm: (state) => (eventId) => {
        const list = state.formList;
        return list.find((form) => {
            return form.eventId === eventId;
        });
    },

};
